/* 
 * Quechua - the lightweight data mining framework
 *
 * Copyright (C) 2012 Marek Denis <quechua@octogan.net>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef TYPES_H
#define	TYPES_H

#include <sys/types.h>

#include <memory>
#include <queue>
#include <map>
#include <string>

#include <glibmm/init.h>
#include <glibmm/module.h>
#include <glibmm/init.h>
#include <glibmm/thread.h>
#include <glibmm/threadpool.h>
#include <libconfig.h++>
#include <pqxx/pqxx>

class DataPack;

typedef uint8_t  u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;

typedef int8_t   s8;
typedef int16_t  s16;
typedef int32_t  s32;
typedef int64_t  s64;

typedef std::shared_ptr<DataPack> datapack_ptr;
typedef std::queue<datapack_ptr> queue_t;

typedef std::string string_t;

typedef Glib::Module g_module;
typedef Glib::Mutex g_mutex;
typedef Glib::ThreadPool g_threadpool;

typedef libconfig::Config configuration_t;
typedef libconfig::Setting setting_t;

typedef libconfig::ParseException parse_ex;
typedef libconfig::SettingNotFoundException setting_ex;
typedef libconfig::FileIOException file_io_ex;

typedef std::bad_alloc alloc_ex;

typedef pqxx::work dbwork_t;
typedef pqxx::connection dbconnection_t;
typedef pqxx::result dbresult_t;
typedef pqxx::broken_connection connection_ex;
typedef pqxx::undefined_column undefined_column_ex;
typedef pqxx::in_doubt_error commit_ex;

using std::nothrow;
using std::exception;

#define DEBUG_QUEUES

#endif	/* TYPES_H */

